1. Field of the Invention
The present disclosure relates to a data output dispatching device and method, especially to a data output dispatching device and method capable of reducing a probability that packets from the same queue are transmitted sequentially.
2. Description of Related Art
A data output dispatching algorithm is often introduced into a communication product (e.g., a network communication product) to determine the output order of data in a plurality of queues. The weighted round robin (WRR) algorithm is a common algorithm for dispatching data, and capable of dispatching data from a plurality of queues for output according to weightings of these queues. For example, if the queues are queues Q0, Q1, Q2 and Q3, the data of the queues Q0, Q1, Q2 and Q3 are labeled with a, b, c and d respectively for understanding and the weightings of the queues Q0, Q1, Q2 and Q3 are 1, 1, 2 and 4 respectively, the outputted data from these queues as shown in FIG. 1 will be . . . a-b-cc-dddd-a-b-cc-dddd-a-b . . . in turn provided that the data of each queue are sufficient for output, in which the data of queues Q0, Q1, Q2 and Q3 come from a preceding device (which could be a terminal instead) 110 and are stored in buffers 122, 124, 126 and 128 of a current device 120 to be outputted to a next device (which could be a terminal instead) 130. The advantage of the WRR algorithm is easy to be implemented, while the disadvantage of the WRR algorithm includes the problem of data burst due to uneven weighting allocation, the problem of unstable output of a single queue, etc. Taking FIG. 1 for example, the queue Q3 in the buffer 128 is allowed to transmit four consecutive units of data (i.e., dddd) which effect the peak of data output, and then the queues Q0, Q1 and Q2 in the buffers 122, 124 and 126 are allowed to transmit four units of data (i.e., a-b-cc) which effect the valley of data output. If the weighting of the queue Q3 is higher or the data amount of each of the consecutive units of data is big, the problem of unstable data output will be more serious.